<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="./resources/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="./resources/css/style.css" media="all">
    <style>
        html,body{position: relative;left: 0;right: 0;top: 0;bottom: 0; width: 100%;height: 100%;}
        body{overflow: hidden;}
        .layui-form-select input{width: 100%;!important;}
        .layui-form-label{width: 100px;text-align: justify;height: 20px;}
        .layui-form-label:after{content:'';width: 100%;display: inline-block;}
        .layui-input-block{margin-left: 140px;}
        #date1,#date2{margin-bottom: 10px;}
        ._submit{width: 100%;text-align: center;}
        .layui-select-title{margin-left: 10px;}
        .bixuan{left: 4px;}
        
        .layui-form-select .layui-input{padding-right: 0;}
        /*
        设置样式居中
        */
        /*.layui-form-item{padding-left:76px;}*/
        .formTop_inTs{width: 80%;}
        .chaxun{width: 100%;}
        .layui-select-title{margin-left: 0;}

        .masksx .forms{padding-left: 90px;}

        .layui-input-block{margin-bottom: 8px;}
        .warp{width: 100%; position: relative;height: 100%;}
        .yonghu,.qiye,.chaxuns,.yindao{width: 40%;background-color: #FFF;margin: 0 auto; padding: 20px; box-shadow: 0px 0px 5px  #2E2D3C; border-radius: 5px;margin-top: 3%;position: absolute;right: 50px; }
        .qiye{z-index: 99;left: 0;top: 130%;}
        .yonghu{right:-200%;}

        .saoma{text-align: center;position: absolute;bottom:40%;left: 0;right: 0;}
        .beijingPIC{background-image: url("./resources/images/banner1.png");height: 153px;background-repeat: no-repeat;background-size: 100%;position: absolute;bottom: 0;left: 0;right: 0;background-position-y:100%; }
        .zhifu_pic{width:200px;height: 200px;margin: 0 auto;margin-top: 20%;}
        .zhuantai{color: red;}
        .zhezhao,.zhezhao1{height: 100%;width: 100%;position: absolute;background: rgba(0,0,0,.8);left: 0;top: 0;z-index: 99;text-align: center;}
        .zhezhao span,.zhezhao1 span{margin-top: 50%;color: #FFF;font-size: 60px;display: inline-block;}
        .zhifu_pics{width: 100%;height: 100%;}
        .saoma p{font-size: 20px;}
        .warpL,.qiye,.yonghu,.chaxuns,.yindao{height: 88%;padding: 0;}
        .warpL{height: 50%; width:80%;float: left;background-color: #FFF;margin-top: 10%; box-shadow: 0px 0px 5px  #2E2D3C; border-radius: 5px; position: relative;left: -100%;}
        .forms{margin: 20px;}
        .cS3_qiyes{animation: qiyes 2s linear infinite alternate;animation-fill-mode:forwards ;animation-iteration-count:1;}
        .cS3_chaxunsT{animation: chaxunsT 2s linear infinite alternate;animation-fill-mode:forwards
        ;animation-iteration-count:1;}
        .cS3_chaxunsB{animation: chaxunsB 2s linear infinite alternate;animation-fill-mode:forwards
        ;animation-iteration-count:1;}
        .cS3_chaxunsBs{animation: chaxunsBs 2s linear infinite alternate;animation-fill-mode:forwards
        ;animation-iteration-count:1;}
        .cS3_zhifus_j{animation: zhifus_J 2s linear infinite alternate;animation-fill-mode:forwards ;animation-iteration-count:1;}
        .cS3_zhifus_c{animation: zhifus_C 2s linear infinite alternate;animation-fill-mode:forwards ;animation-iteration-count:1;}
        .cS3_yonghus{animation: yonghus 2s linear infinite alternate;animation-fill-mode:forwards ;animation-iteration-count:1;}

        /*.zhezhao1{display: none;}*/
        /*.qiye{display: none;}*/
        @keyframes qiyes
        {
            0% {top: 130%;}
            100% {top: 3%;}
        }
        @keyframes chaxunsT
        {
            0% {top: 3%;}
            100% {top: -100%;}
        }
        @keyframes chaxunsB
        {
            0% {top: 130%;}
            100% {top: 10%;}
        }
        @keyframes chaxunsBs
        {
            0% {top: 10%;}
            100% {top: 130%;}
        }
        @keyframes zhifus_J
        {
            0% {left: -100%;}
            100% {left:10%;}
        }
        @keyframes zhifus_C
        {
            0% {left:30%;}
            100% {left: -100%;}
        }
        @keyframes yonghus
        {
            0% {right:-200%;}
            100% {right: 30%;}
        }
        .tijiao{width: 150px!important;}
        .chaxuns{ right: 20%;height: 40%;width: 60%;top: 130%;}
        .chaxuns .titles{margin-top: 0;font-size: 18px; background-color: #393D49;
            height: 40px;line-height: 40px;color: #FFF;}

        .chaxuns .addUser{margin: 25px;margin-top: 80px;}
        .Result{display: none;}
        .ResultSpan,.cha{color: #00a2d4; cursor:pointer;}
        .Result p{text-align: center;font-size: 18px;}
        .cha{text-align: right;margin-right: 25px;font-size: 16px;}
        .chaQ{text-align: right;margin-right: 25px;font-size: 16px;}
        .yindao{width: 60%;right: 20%;}
        .yindao .layui-timeline{margin: 60px;}
        .titleson{font-size: 20px!important;}
        .numBers{border: 1px solid #5FB878;
            border-radius: 50%;position:absolute;width: 20px;height: 20px;line-height: 20px;text-align: center;top: 0;left: -5px; background-color: #FFF;z-index: 10;}
        .YinDaoBut,.YinDaoButZF,.YinDaoButTJ,.YinDaoButXX{position: absolute;right: 0;top: 0;display: none;}
        .YinDaoBut{display: inline-block;}
        .YinDaoButZF{ right: 100px;}
        .greens{background-color: green;color: #FFF;}
        .layui-timeline-item1:before{
            background-color: green; content: '';position: absolute; left: 5px;top: 0;z-index: 1;width: 1px;height:
                100%;
        }
        .yindao{height: 50%;}
        .xianxias{text-indent: 1em; border: 1px solid #eee;margin: 10px;line-height: 30px;}
        .xianxias h2{height: 40px;border-bottom: 1px solid #EEE;line-height: 40px;font-weight: bolder;}
        .xianxias strong{padding-left: 14px;}
        .xianxias .layui-table tbody tr{text-align: center;}
        .fanhui{float: right;margin-right: 10px;color: #00a2d4;}
        .dingdanchaxun,.qiyechaxun{display: none;}
        .chaQ{text-align: right;margin-right: 25px;font-size: 16px;color: #00a2d4;cursor:pointer;margin-bottom: 10px;}
        .jianges{margin-right: 20px;}
        .yins{display: none;}
        .gongliao{display: none;}
        .layui-form-checkbox{margin-right: 5px;}
    </style>
</head>
<body>

    <div class="warp">
        <div class="yindao">
            <ul class="layui-timeline">
                <li class="layui-timeline-item">
                   <div class="numBers">
                       1
                   </div>
                    <div class="layui-timeline-content layui-text">
                        <h3 class="layui-timeline-title titleson">企业资料</h3>
                        <p>
                            企业信息审核
                            <br>填写企业信息、负责人、联系方式、纳税识别号等
                            <button class="layui-btn layui-btn-sm YinDaoBut" type="button">立即完善企业信息</button>
                        </p>
                    </div>
                </li>
                <li class="layui-timeline-item">
                    <div class="numBers">
                        2
                    </div>
                    <div class="layui-timeline-content layui-text">
                        <h3 class="layui-timeline-title titleson">注册支付</h3>
                        <p>
                            支付成功后即可继续注册登录账户
                            <button class="layui-btn layui-btn-sm YinDaoButZF" type="button">支付宝支付</button>
                            <button class="layui-btn layui-btn-sm YinDaoButXX" type="button">线下支付</button>

                        </p>

                    </div>
                </li>
                <li class="layui-timeline-item">
                    <div class="numBers">
                       3
                    </div>
                    <div class="layui-timeline-content layui-text">
                        <h3 class="layui-timeline-title titleson">为您的企业添加用户</h3>
                        <p>
                            支付成功,添加用户
                            <button class="layui-btn layui-btn-sm YinDaoButTJ" type="button">添加用户</button>

                        </p>
                    </div>
                </li>
                <!--<li class="layui-timeline-item">-->
                    <!--<i class="layui-icon layui-timeline-axis"></i>-->
                    <!--<div class="layui-timeline-content layui-text">-->
                        <!--<div class="layui-timeline-title">过去</div>-->
                    <!--</div>-->
                <!--</li>-->
            </ul>
            <p class="chaQ">企业查询(是否注册企业)</p>
            <p class="cha">已注册企业并支付成功,继续注册用户</p>
        </div>
        <div class="warpL">
            <iframe src="" class="PC_zhifu"></iframe>
            <div class="xianxias">
                <h2>订单信息</h2>
                <p>产品:<span>工程建筑ERP产品</span></p>
                <p>数量:<span>1</span></p>
                <p>金额:<span>3500.00¥</span></p>
                <table class="layui-table">
                    <thead>
                        <tr>
                            <th>银行</th>
                            <th>开户行</th>
                            <th>账户</th>
                            <th>账号</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>郑州银行</td>
                            <td>郑州银行互助路支行</td>
                            <td>河南砼鑫软件科技有限公司</td>
                            <td>9050 1880 1300 0501 2</td>
                        </tr>
                    </tbody>
                </table>
                <strong>说明: 请按照上方银行账户给我们汇款,汇款完成后,请直接与我们联系</strong>
                <p><span class="jianges">联系电话:0371-86088106</span><span class="jianges">QQ:3571576660</span><span class="jianges">邮箱:321273757@qq.com</span></p>
            </div>
            <a href="./index.html" class="fanhui">返回登录页面</a>
        </div>
        <div class="qiye">
            <div class="forms">
                <form class="layui-form tianjiaqiye" action="" method="post">

                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>企业全称：</label>
                        <div class="layui-input-block">
                            <input type="text" name="compname" lay-verify="required" autocomplete="off" placeholder="请输入企业全称" class="layui-input" value="">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>企业地址：</label>
                        <div class="layui-input-block">
                            <input type="text" name="addr" lay-verify="required" autocomplete="off" placeholder="请输入企业地址" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>企业类别：</label>
                        <div class="layui-input-block">
                            <select name="comptype" lay-search="" lay-verify="required" lay-filter="jiazai">
                                <option value=""></option>
                                <option value="2">施工单位</option>
                                <option value="3">供货商</option>
                            </select>
                            <input type="text" name="securid_Compid" placeholder="" autocomplete="off" class="layui-input yinchang">
                        </div>
                    </div>
                    <div class="layui-form-iter gongliao">
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="bixuan">*</span>供料类型：</label>
                            <div class="layui-input-block duoxuans">


                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>联系电话：</label>
                        <div class="layui-input-block">
                            <input type="text" name="tel" lay-verify="required" autocomplete="off" placeholder="请输入联系电话" class="layui-input num-yanzheng" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">传真：</label>
                        <div class="layui-input-block">
                            <input type="text" name="fax" autocomplete="off" placeholder="请输入传真" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>联络人：</label>
                        <div class="layui-input-block">
                            <input type="text" name="contack" lay-verify="required" autocomplete="off" placeholder="请输入联络人" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>负责人：</label>
                        <div class="layui-input-block">
                            <input type="text" name="director" lay-verify="required" autocomplete="off" placeholder="请输入负责人" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>负责人电话：</label>
                        <div class="layui-input-block">
                            <input type="text" name="dmotel" lay-verify="required" autocomplete="off" placeholder="请输入负责人电话" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>纳税识别号：</label>
                        <div class="layui-input-block">
                            <input type="text" name="facno" lay-verify="required" autocomplete="off" placeholder="请输入纳税识别号" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮政编码：</label>
                        <div class="layui-input-block">
                            <input type="text" name="postid"  autocomplete="off" placeholder="请输入邮政编码" class="layui-input" value="">
                        </div>
                    </div>
                    <input type="hidden" name="useing" value="0"  id="useing"/>
                    <input type="hidden" name="mark" value="1" id="mark" />
                    <input type="hidden" name="state" value="0" id="state"/>
                    <input type="hidden" name="compid" value="" id="compid"/>


                    <input type="hidden" name="compnames" value="" />
                    <div class="_submit">
                        <button class="layui-btn layui-btn-sm tijiao xian" lay-submit lay-filter="EN_tijiao">注册企业</button>
                        <button class="layui-btn layui-btn-sm tijiao yins" lay-submit lay-filter="XG_tijiao">修改企业</button>
                        <button class="layui-btn layui-btn-sm tijiao yins yonghus" type="button">注册用户</button>

                    </div>

                </form>
            </div>
        </div>
        <div class="yonghu">
            <div class="forms">
                <form class="layui-form addUser" method="post" action="">

                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>操作员名称<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" name="empname1" lay-verify="required" autocomplete="off" placeholder="请输入" class="layui-input" value="">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>密码<span class="maohao">：</span></label>
                        <div class="layui-input-block" style="position: relative;">
                            <input type="password" name="pwd"  placeholder="请输入" lay-verify="pass|required" autocomplete="off" class="layui-input">
                            <i class="layui-icon qiehuan" style="position: absolute;right: 40px;top: 10px;width: 20px; height: 20px;text-align: center;">&#xe705;</i>
                        </div>
                    </div>


                    <div class="layui-form-item" style="display: none;">
                        <label class="layui-form-label"><span class="bixuan">*</span>用户组<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <select lay-search="" name="groupcode" id="groupcode">
                                <option value=""></option>
                            </select>
                            <input type="text" name="securid_G" placeholder="" autocomplete="off" class="layui-input yinchang">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>员工类型<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <select lay-verify="required" lay-search="" name="emptype" lay-filter="yuangongleixing" class="empjs">
                                <!--<option value=""></option>
                                <option value="1">1</option>
                                <option value="2">2</option>-->
                            </select>
                            <input type="text" name="securid_Em" placeholder="" autocomplete="off" class="layui-input yinchang">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>身份证号<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" name="securid" lay-verify="identity|required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>出生日期<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="date1" lay-verify="required" placeholder="yyyy-MM-dd" name="birthday">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">电子邮箱<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" name="email" lay-verify="email" autocomplete="off" placeholder="请输入" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>电话号码<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="tel" name="motel" lay-verify="required|yidongguhua"  placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>联系人<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" name="contack" lay-verify="required" autocomplete="off"  placeholder="请输入" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮政编码<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="number" name="postidaddr" lay-verify="code" autocomplete="off"  placeholder="请输入" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>通讯地址<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" name="addr" lay-verify="required" autocomplete="off"  placeholder="请输入" class="layui-input" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>户籍地址<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" name="addr2" lay-verify="required" autocomplete="off"  placeholder="请输入" class="layui-input" value=""/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="bixuan">*</span>到职日期<span class="maohao">：</span></label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="test-limit1" lay-verify="required" placeholder="yyyy-MM-dd" name="rdate">
                        </div>
                    </div>
                    <!--<div class="layui-form-item">-->
                    <!--<label class="layui-form-label">离职日期<span class="maohao">：</span></label>-->
                    <!--<div class="layui-input-block">-->
                    <!--<input type="text" class="layui-input" id="test-limit2" placeholder="yyyy-MM-dd" name="ldate">-->
                    <!--</div>-->
                    <!--</div>-->
                    <input type="hidden" class="layui-input" name="opid" value="" />
                    <input type="hidden" class="layui-input" name="useing" value="0" />
                    <input type="hidden" class="layui-input" name="state" value="0" />
                    <input type="text" class="layui-input compids" name="compid.compid" value="" style="display: none;"/>


                    <div class="_submit">
                        <button class="layui-btn layui-btn-sm tijiao" lay-submit lay-filter="_subm">注册</button>
                        <!--<button class="layui-btn layui-btn-sm " type="reset">重置</button>-->
                    </div>

                </form>
            </div>

        </div>
        <div class="chaxuns">
            <div class="titles">支付订单查询</div>
            <form class="layui-form addUser" method="post" action="">

                <div class="layui-form-item dingdanchaxun">
                    <label class="layui-form-label"><span class="bixuan">*</span>支付宝订单号
                        <span class="maohao">：</span></label>
                    <div class="layui-input-block">
                        <input type="text" name="dingdanhaos" lay-verify="required" autocomplete="off" placeholder="请输入支付宝订单号" class="layui-input" value="">
                    </div>
                </div>
                <div class="layui-form-item qiyechaxun">
                    <label class="layui-form-label"><span class="bixuan">*</span>企业名称<span class="maohao">：</span></label>
                    <div class="layui-input-block" style="position: relative;">
                        <input type="text" name="remark"  placeholder="请输入企业名称" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="_submit">
                    <button class="layui-btn layui-btn-sm tijiao" lay-submit lay-filter="chaxuns">查询</button>
                </div>
            </form>
            <div class="Result">
                <p calss="Resulton">您已支付成功,<span class="ResultSpan">点击继续注册用户</span></p>

            </div>
        </div>
    </div>
<div class="jieshou"></div>

<script src="./resources/layui/layui.js" charset="utf-8"></script>
<script src="./resources/js/jquery.js"></script>
<script src="./resources/js/api.js"></script>
<script>
    window.onload=function () {
        $(document).on('keydown',function (e) {         //监听键盘TAB事件
            ////console.log(e.keyCode);
            if(e.keyCode=='9'){                         //如果按下的为TAB  终止事件
                return false;
            }
        });



        $('input').val('');                             //所有input的内容清空
        function getUrlParam(name) {                    //判断是否是从支付页面跳转回来的
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg); //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
        //如果不为空  就是从支付页面跳转来的  可执行下一步注册;
        if(getUrlParam('trade_no')){
            $('.numBers').eq(0).addClass('greens');
            $('.layui-timeline-item').eq(0).addClass('layui-timeline-item1');
            $('.numBers').eq(1).addClass('greens');
            $('.layui-timeline-item').eq(1).addClass('layui-timeline-item1');
            $('.YinDaoBut').remove();
            $('.YinDaoButZF').remove();
            $('.YinDaoButXX').remove();
            $('.YinDaoButTJ').show();
            $('.compids').val(getCookie('Qid'));
            if(!getCookie('Qid')){
                location.href='./index.html';
                return;
            }
            sessionStorage.Ddan=getUrlParam('trade_no');
        }
    }


    layui.use(['form', 'layedit', 'laydate','table','element'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate
            ,table=layui.table
            ,element=layui.element;
        var p='100|100|100|100';
//        ajaxs('/api/permi/loadPermi.do','post',{},function (data) {
//            ////console.log(data)
//            var d=data.data;
//            for(var i=0;i<d.length;i++){
//                if(d[i].id==5||d[i].id==7){
//                    $('[name="groupcode"]').append('<option value="'+d[i].id+'">'+d[i].groupname+'</option>')
//                }
//
//            }
//            form.render();
//        });
        ajaxs('/api/public/loadFullDown.do','get',{'type':2},function (data) {
            ////console.log(data)
            var d=data.fullDown.type2;
            $('.duoxuans').html('');
            for(var i=0;i<d.length;i++){
                $('.duoxuans').append('<input type="checkbox" lay-filter="filter" value="'+d[i].p_value+'" name="like[write]" title="'+d[i].p_name+'">')
            }
            form.render();

        })


        ajaxs('/api/public/loadFullDown.do','get',{'type':3,'p':p},function (data) {
            ////console.log(data)
            var d=data.fullDown.type3;
            for(var i=0;i<d.length;i++){
                    $('[name="emptype"]').append('<option value="'+d[i].id+'">'+d[i].p_name+'</option>')
            }
            form.render();
        });
        $('.demoTable .layui-btn').on('click', function(){
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
        $('.close').click(function () {     //遮罩层隐藏
            $('.mask').hide();
        });
        //日期
        laydate.render({
            elem: '#date1'
            ,type: 'datetime'
        });
        laydate.render({
            elem: '#test-limit1'
            ,type: 'datetime'
        });
        //自定义验证规则
        form.verify({
            pass: [ /^[A-Za-z0-9]{6,20}$/, '密码必须6到12位']         //密码验证
            ,code: [ /^[0-9]{6}$/, '请输入正确的邮政编码']         //邮政验证
//            ,yidongguhua:[/^[\d]{4}-[\d]{7}$/, '请输入正确的联系方式']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });
        //控制密码查看功能
        $('.qiehuan').click(function () {
            $(this).prev().attr('type')=='type'?$(this).prev().attr('type','password'):$(this).prev().attr('type','type');
        });
        var times = 0;
        $("[name='compname']").keyup(function () {
            clearTimeout(times);
            var root = this;
            // 小华更改,128 编辑企业--提交按钮被禁用
            times = setTimeout(function () {
                var _names=$(root).val();               //获取页面值
                _names=$.trim(_names);
                if(_names!=''){
                    if(_names==$("[name=compnames]").val()){
                        return;
                    }
                    ajaxs('/api/public/cheName.do','get',{"type":1,"name":_names},function (data) {
                        ////console.log(data)
                        if(data.data=='0'){
//                            layer.msg('企业名可用');
                            $('.tijiao').removeAttr('disabled').removeClass('layui-btn-disabled');
                        }else{
                            layer.msg('企业名称已存在 请重新输入');
                            $('.tijiao').attr('disabled',"true").addClass('layui-btn-disabled');
                        }
                    })
                }
            }, 500)

        });
        /*下列几个点击事件 分别代表各div内部提交按钮点击后会触发的css3动画*/
        $('.cha').on('click',function () {
            $('.yindao').addClass('cS3_chaxunsBs');
            $('.chaxuns').addClass('cS3_chaxunsB');
            $('.dingdanchaxun').show().children().children('input').attr('lay-verify','required');
            $('.qiyechaxun').hide().children().children('input').attr('lay-verify','false');
            $('.chaxuns .tijiao').attr('lay-filter','chaxuns')
        });
        $('.chaQ').on('click',function () {
            $('.yindao').addClass('cS3_chaxunsBs');
            $('.chaxuns').addClass('cS3_chaxunsB');
            $('.dingdanchaxun').hide().children().children('input').attr('lay-verify','false');
            $('.qiyechaxun').show().children().children('input').attr('lay-verify','required');
            $('.chaxuns .tijiao').attr('lay-filter','qiyechaxuns');
            $('.chaxuns .titles').html('企业查询');

        });
        $('.YinDaoBut').on('click',function () {
            $('.yindao').addClass('cS3_chaxunsBs');
            $('.qiye').addClass('cS3_qiyes');

        });
        $('.YinDaoButXX').on('click',function () {
            $('.yindao').addClass('cS3_chaxunsBs');
            $('.warpL').addClass('cS3_zhifus_j');
            $('.PC_zhifu').hide();

        });
        $('.YinDaoButZF').on('click',function () {
            $('.PC_zhifu').attr('src',urls+'/api/pay/pcPay.do?compid='+getCookie('Qid'));
            var index = layer.load(5); //换了种风格
            var _Width=$(window).width();
            var _List=_Width*.5;
            Btnoff('.YinDaoButZF');
        });
        $('.YinDaoButTJ').on('click',function () {
            $('.yindao').addClass('cS3_chaxunsBs');
            $('.yonghu').addClass('cS3_yonghus');

        });
        //添加监听   检查企业名称是否存在
        var time = 0;
        var chushi;
        $("[name='empname1']").focus(function(){                //input获得焦点时 给input添加监听键盘按下事件
            if($("[name='empname1']").val().length<=0)return;
            $("[name='empname1']").keyup(function () {
                clearTimeout(time);
                ////console.log(chushi)
                var root = this;
                // 小华更改,128 编辑企业--提交按钮被禁用
                time = setTimeout(function () {
                    var _names=$(root).val();               //获取页面值
                    _names=$.trim(_names);
                    ////console.log(_names==chushi,'>>>>>>>>>>>>>>>>>>>')
                    if(_names){
                        if(_names==chushi){
                            return;
                        }
                        ajaxs('/api/public/cheName.do','get',{"type":2,"name":_names},function (data) {
                            ////console.log(data)
                            if(data.data=='0'){
//                            layer.msg('企业名可用');
                                $('.tijiao').removeAttr('disabled').removeClass('layui-btn-disabled');
                            }else{
                                layer.msg('企业名称已存在 请重新输入');
                                $('.tijiao').attr('disabled',"true").addClass('layui-btn-disabled');
                            }
                        })
                    }
                }, 500)

            })
        });
        //监听企业类型选择
        form.on('select(jiazai)', function(data){
            ////console.log(data.elem); //得到select原始DOM对象
            ////console.log(data.value); //得到被选中的值
            ////console.log(data.othis); //得到美化后的DOM对象
            if(data.value==3){                      //如果下拉框值为3 类名为gongliao的div显示出来 否则 隐藏
                $('.gongliao').show();
            }else{
                $('.gongliao').hide();
            }

        });




        //查询提交监听


        //查询企业
        $('.yonghus').on('click',function () {
            $('.qiye').addClass('cS3_chaxunsT').removeClass('cS3_qiyes');
            $('.yonghu').addClass('cS3_yonghus');
        });
        form.on('submit(qiyechaxuns)', function(data){
            ////console.log(data.field,'<-----------------') //当前容器的全部表单字段，名值对形式<span class="maohao">：</span>{name: value}
            Btnon('.tijiao');        //禁止提交按钮点击
            data.field.type='b';
            data.field.p='100|0013|001|001';
            $.ajax({
                type:'post',
                url:urls+'/api/pay/finPayInfo.do',
                data:data.field,
                success:function (data) {
                    ////console.log(data,'/as/d/asd/a/sda/')
                    Btnoff('.tijiao');      //开放 按钮点击
                    var d=data.data;
                    if(d.length==0){
                        layer.confirm('企业不存在是否注册企业？', {
                            btn: ['前往注册','留在此页'] //按钮
                        }, function(index){
                            $('.chaxuns').addClass('cS3_chaxunsBs').removeClass('cS3_chaxunsB');
                            $('.qiye').addClass('cS3_qiyes');
                            layer.close(index);
                        }, function(indexs){
                            layer.close(indexs);
                        });


                        return;
                    }
                    if(d[0][0].isExis>0){
                        layer.confirm('企业已存在,是否跳转支付页面？', {
                            btn: ['立即跳转','我已支付,查询订单'] //按钮
                        }, function(){
                            $('.PC_zhifu').attr('src',urls+'/api/pay/pcPay.do?compid='+d[0][0].compid);
                            var index = layer.load(5); //换了种风格
                            var _Width=$(window).width();
                            var _List=_Width*.5;
                            Btnoff('.layui-layer-btn0');
                        }, function(){
                            $('.dingdanchaxun').show().children().children('input').attr('lay-verify','required');
                            $('.qiyechaxun').hide().children().children('input').attr('lay-verify','false');
                            $('.chaxuns .tijiao').attr('lay-filter','chaxuns')
                        });
                        if(d[1][0].nnn==0){
                            $('.layui-layer-btn1').hide();
                        };

                    }else{
                        layer.msg('企业不存在,请先注册企业');
                        $('.chaxuns').addClass('cS3_chaxunsBs').removeClass('cS3_chaxunsB');
                        $('.qiye').addClass('cS3_qiyes');
                    }
                },
                error:function (data) {
                    layer.msg('网络异常');
                    Btnoff('.tijiao');      //开放 按钮点击
                }
            })
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
        //查询订单
        form.on('submit(chaxuns)', function(data){
            ////console.log(data.field,'<-----------------') //当前容器的全部表单字段，名值对形式<span class="maohao">：</span>{name: value}
            Btnon('.tijiao');        //禁止提交按钮点击
            data.field.outTradeNo=$('[name="dingdanhaos"]').val();
            data.field.p='100|0013|001|001';
            $.ajax({
                type:'post',
                url:urls+'/api/pay/outTradeNo.do',
                data:data.field,
                success:function (data) {
                    ////console.log(data)
                    Btnoff('.tijiao');      //开放 按钮点击
                    if(!data.data){
                        layer.msg('请检查您的支付宝订单号');
                        return;
                    };
                    if(!data.data.userid){
                        layer.msg(data.msg);
                        sessionStorage.qiye=data.data.compid;       //所属企业
                        sessionStorage.qiyeleixing=data.data.comptype;       //企业类型
                        $('[name="compid.compid"]').val(data.data.compid);   //设置input的值
                        $('[name="comptype"]').val(data.data.comptype);      //设置input的值
                        $('.chaxuns').addClass('cS3_chaxunsBs').removeClass('cS3_chaxunsB');
//                        $('.yonghu').addClass('cS3_yonghus');
                          $('.qiye').addClass('cS3_qiyes');
                        //查询支付宝订单号是否可用
                        ajaxs('/api/comp/loadCompDetail.do','post',{'compid':data.data.compid},function (data) {
                            //console.log(data)
                            var d=data.data;
                            //给页面上的input填充内容
                            $('[name="compname"]').val(d.compname);
                            $('[name="addr"]').val(d.addr);
                            $('[name="comptype"]').val(d.comptype);
                            $('[name="tel"]').val(d.tel);
                            $('[name="contack"]').val(d.contack);
                            $('[name="director"]').val(d.director);
                            $('[name="dmotel"]').val(d.dmotel);
                            $('[name="facno"]').val(d.facno);
                            $('.xian').hide();
                            $('.yins').show();
                            var n=0;
                            if(d.comptype==2){
                              n=5;
                            }else if(d.comptype==3){
                                n=7;
                            };
                            sessionStorage.group=n;
                            form.render();
                        });
                        $('.compids').val(data.data.compid);
                        sessionStorage.Ddan=$('[name="dingdanhaos"]').val();
                    }else{
                        layer.msg('支付单号已经被注册');
                        setTimeout(function () {
                            location.href='./index.html';
                        },1000);
                    };
                },
                error:function (data) {
                    layer.msg('网络异常');
                    Btnoff('.tijiao');      //开放 按钮点击
                }
            })
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
        //修改企业信息
        form.on('submit(XG_tijiao)', function(data){
            ////console.log(data.field,'<-----------------') //当前容器的全部表单字段，名值对形式<span class="maohao">：</span>{name: value}
            Btnon('.tijiao');        //禁止提交按钮点击
            data.field.compid=sessionStorage.qiye;
            data.field.mark='2';
            data.field.useing='0';
            data.field.state='-1';
            data.field.p='100|0013|001|001';
            $.ajax({
                type:'post',
                url:urls+'/api/comp/inComp.do',
                data:data.field,
                success:function (data) {
                    ////console.log(data)
                    Btnoff('.tijiao');      //开放 按钮点击
                    layer.msg(data.msg);

                },
                error:function (data) {
                    layer.msg('网络异常');
                    Btnoff('.tijiao');      //开放 按钮点击
                }
            })
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
        $('.ResultSpan').on('click',function () {
            $('.chaxuns').addClass('cS3_chaxunsBs');
            $('.yonghu').addClass('cS3_yonghus');
        });
        //企业提交监听
        form.on('submit(EN_tijiao)', function(data){
            ////console.log(data.field,'<-----------------') //当前容器的全部表单字段，名值对形式<span class="maohao">：</span>{name: value}
            var phoneNum=$(".num-yanzheng").val();
            var duoxuans=[];
            $('[name="like[write]"]').each(function (k,v) {
                if($(v).is(":checked")){
                    duoxuans.push($(this).val());
                }
            });

            duoxuans=duoxuans.join(',');       //数组转json字符串用于发送ajax便于后台接收
            Btnon('.tijiao');        //禁止提交按钮点击

            data.field.p='100|0013|001|001';
            data.field.mark='1';
            data.field.useing='0';
            data.field.state='-1';
            data.field.mattype=duoxuans;
            //发送ajax提交数据  完成后阻断form表单提交  防止页面跳转触发未知错误
            $.ajax({
                type:'post',
                url:urls+'/api/comp/inComp.do',
                data:data.field,
                success:function (data) {
                    ////console.log(data)
                    layer.msg(data.msg);
                    if(data.code==0){
                        setCookie('Qid',data.data.compid);       //所属企业
                        setCookie('qiyeleixing',data.data.comptype);       //企业类型
                        $('[name="compid.compid"]').val(data.data.compid);      //页面内容填充数据
                        $('[name="comptype"]').val(data.data.comptype);
                        $('.zhezhao1').remove();                                //删除遮罩层内容
                        $('.qiye').addClass('cS3_chaxunsBs').removeClass('cS3_qiyes');         //css3动画显示  隐藏
                        $('.yindao').addClass('cS3_chaxunsB').removeClass('cS3_chaxunsBs');
                        $('.numBers').eq(0).addClass('greens');
                        $('.layui-timeline-item').eq(0).addClass('layui-timeline-item1');
                        $('.YinDaoBut').hide();
                        $('.YinDaoButZF').show();
                        $('.YinDaoButXX').show();
                        var n=0;
                        if(data.data.comptype==2){      //如果返回值data.data.comptype等于2 那么n=5 如果等于3 那么n=7
                            n=5;
                        }else if(data.data.comptype==3){
                            n=7;
                        }
                        sessionStorage.group=n;
                    }else{
                        Btnoff('.tijiao');      //开放 按钮点击
                    };
                },
                error:function (data) {
                    layer.msg('网络异常');
                    Btnoff('.tijiao');      //开放 按钮点击
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
        //用户提交监听
        form.on('submit(_subm)', function(data){
            ////console.log(data.field,'<-----------------') //当前容器的全部表单字段，名值对形式<span class="maohao">：</span>{name: value}
            var now = new Date();                               //获取当前时间
            now.setFullYear(now.getFullYear()+1);               //设置时间
            var time1 = now.format("yyyy-MM-dd hh:mm:ss");      //时间转换
            ////console.log(time1)
            $("[name='accendtime']").val(time1);                  //赋值
            data.field.p='100|100|100|100';
            data.field.ldate=time1;
            data.field.useing='0';
            data.field.state='0';
            data.field.no=sessionStorage.Ddan;
            data.field.groupcode=sessionStorage.group;
            data.field.comptype=$('[name="groupcode"]').val();
            data.field.flag=1;
            //发送ajax提交数据  完成后阻断form表单提交  防止页面跳转触发未知错误 data参数即data.field的属性
            $.ajax({
                type:'post',
                url:urls+'/api/user/mregist.do',
                data:data.field,
                success:function (data) {
                    ////console.log(data)
                    layer.msg(data.msg);
                    Btnoff('.tijiao')
                    if(data.code==0){
                        setTimeout(function () {
                            location.href='./index.html';
                        },1500)
                    }
                },
                error:function (data) {
                    layer.msg('网络异常');
                    Btnoff('.tijiao');      //开放 按钮点击
                }
            })

            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });

    })

</script>
</body>
</html>